package com.bluesky.drcp.persistence.dao.hibernate;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.bluesky.drcp.business.Module;
import com.bluesky.drcp.business.User;
import com.bluesky.drcp.persistence.dao.ModuleDao;

public class ModuleDaoImpl extends HibernateDaoSupport implements ModuleDao {

	public Module get(String id) {
		return (Module) getHibernateTemplate().get(Module.class, id);

	}

	public void delete(String moduleId) {
		Module module = (Module) getHibernateTemplate().get(Module.class,
				moduleId);
		getHibernateTemplate().delete(module);
	}

	public List getAll() {
		return getHibernateTemplate().find("from Module moudle order by name");
	}

	public void save(Module module) {
		getHibernateTemplate().save(module);

	}

	public void update(Module module) {
		getHibernateTemplate().update(module);

	}

	public Module getByName(String name) {

		return null;
	}

}
